﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QuestionsAnswers.UI.Models
{
    public class Comment
    {
        public int CommentId { get; set; }
        public String Text { get; set; }

        public int AnswerId { get; set; }
        public Answer Answer { get; set; }
       

        public int UserId { get; set; }
        public User User { get; set; }

        public DateTime DateCreated
        {
            get
            {
                return (this._dateCreated == default(DateTime))
                           ? DateTime.Now
                           : this._dateCreated;
            }
            set { this._dateCreated = value; }
        }
        private DateTime _dateCreated = default(DateTime);

        public int CommentRating { get; set; }

    }
}